-- GENERATED SPELL FOR [Tormented Citizen] --


function spell0_21065(pUnit, Event) --@Curse of Weakness,n/a--
pUnit:FullCastSpellOnTarget(11980,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_21065', 642, 1)
end

function spell1_21065(pUnit, Event) --@Shadow Bolt,n/a--
pUnit:FullCastSpellOnTarget(9613,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_21065', 3000, 1)
end

function spell2_21065(pUnit, Event) --@Soulbind,n/a--
pUnit:FullCastSpellOnTarget(36153,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_21065', 2000, 1)
end

function Sorts_21065(pUnit, Event)
local choix_sorts_21065 = math.random(0, 2)
if choix_sorts_21065 == 0 then
pUnit:RegisterEvent('spell0_21065', 1, 1)
end
if choix_sorts_21065 == 1 then
pUnit:RegisterEvent('spell1_21065', 1, 1)
end
if choix_sorts_21065 == 2 then
pUnit:RegisterEvent('spell2_21065', 1, 1)
end
end

function mob21065_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_21065', math.random(1500, 3000), 1)
end

function mob21065_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob21065_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob21065_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(21065, 1, 'mob21065_Action')
RegisterUnitEvent(21065, 2, 'mob21065_Leave')
RegisterUnitEvent(21065, 3, 'mob21065_Kill')
RegisterUnitEvent(21065, 4, 'mob21065_Die')
